#include "TCPClient.hpp"

static void Usage(std::string str)
{
    printf("Usage:\n\t%s %s %s\n",str.c_str(),"ip","port");
}

int main(int args,char* argv[])
{
    if(args!=3)
    {
        Usage(argv[0]);
        exit(1);
    }

    //处理port和ip
    uint16_t serPort=atoi(argv[2]);
    std::string serIp=argv[1];
    std::unique_ptr<TCPClient> tc(new TCPClient(serPort,serIp));
    tc->initClient();
    tc->start();

    return 0;
}